package com.swz.dcrm.db;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

@Dao
public interface CarModelDao {

    @Insert
    void insertSingle(TbCarModel tbCarModel);

    @Query("SELECT * FROM car_model ORDER BY id DESC")
    LiveData<List<TbCarModel>> getTbCarModels();

    @Delete
    void deleteAll(List<TbCarModel> list);

    @Delete
    void delete(TbCarModel carModel);
}
